using UnityEngine;

public class MovableAnimationEnabler : MonoBehaviour
{
	private Animator _animator;

	private void Awake()
	{
		_animator = GetComponentInParent<Animator>();
		_animator.enabled = false;
	}

	private void OnBecameInvisible()
	{
		_animator.enabled = false;
	}

	private void OnBecameVisible()
	{
		_animator.enabled = true;
	}
}
